package com.ruoyi.technician.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.technician.mapper.StoreTechnicianMapper;
import com.ruoyi.technician.domain.StoreTechnician;
import com.ruoyi.technician.service.IStoreTechnicianService;

/**
 * 技师信息Service业务层处理
 *
 * @author ch
 * @date 2021-11-24
 */
@Service
public class StoreTechnicianServiceImpl implements IStoreTechnicianService
{
    @Autowired
    private StoreTechnicianMapper storeTechnicianMapper;

    /**
     * 查询技师信息
     *
     * @param id 技师信息主键
     * @return 技师信息
     */
    @Override
    public StoreTechnician selectStoreTechnicianById(Long id)
    {
        return storeTechnicianMapper.selectStoreTechnicianById(id);
    }

    /**
     * 查询技师信息列表
     *
     * @param storeTechnician 技师信息
     * @return 技师信息
     */
    @Override
    public List<StoreTechnician> selectStoreTechnicianList(StoreTechnician storeTechnician)
    {
        return storeTechnicianMapper.selectStoreTechnicianList(storeTechnician);
    }

    /**
     * 新增技师信息
     *
     * @param storeTechnician 技师信息
     * @return 结果
     */
    @Override
    public int insertStoreTechnician(StoreTechnician storeTechnician)
    {
        storeTechnician.setCreateTime(DateUtils.getNowDate());
        return storeTechnicianMapper.insertStoreTechnician(storeTechnician);
    }

    /**
     * 修改技师信息
     *
     * @param storeTechnician 技师信息
     * @return 结果
     */
    @Override
    public int updateStoreTechnician(StoreTechnician storeTechnician)
    {
        storeTechnician.setUpdateTime(DateUtils.getNowDate());
        return storeTechnicianMapper.updateStoreTechnician(storeTechnician);
    }

    /**
     * 批量删除技师信息
     *
     * @param ids 需要删除的技师信息主键
     * @return 结果
     */
    @Override
    public int deleteStoreTechnicianByIds(Long[] ids)
    {
        return storeTechnicianMapper.deleteStoreTechnicianByIds(ids);
    }


    /**
     * 批量逻辑删除技师信息
     *
     * @param ids 需要删除的技师信息主键
     * @return 结果
     */
    @Override
    public int logicDeleteStoreTechnician(Long[] ids,String delType,Long delUser)
    {
        return storeTechnicianMapper.logicDeleteStoreTechnician(ids,delType,delUser);
    }

    /**
     * 删除技师信息信息
     *
     * @param id 技师信息主键
     * @return 结果
     */
    @Override
    public int deleteStoreTechnicianById(Long id)
    {
        return storeTechnicianMapper.deleteStoreTechnicianById(id);
    }
}
